The popularization of terminal devices, such as a smart mobile phone and a tablet computer, and the upsurge of application stores overturns many concepts of in the field of terminal devices. For example, functions of a terminal device are greatly expanded and enriched by installation of applications compatible with operating systems. The installation of applications is to install application files into file systems of a terminal device for execution. In the process of using applications, a purpose of storing data is achieved by creating and altering files in file systems according to requirements for applications. As time goes by, running of these applications may produce many junk files. Sometimes, even though a user uninstalls a certain application, files produced by the application are not deleted but still retained in the user's file system. While browsing the file system, the user would not know which applications create these files, thus the user are unable to sort his/her documents and data. Accumulation of junk files will undoubtedly impact the normal operating speed and processing capacity of the terminal device. However, when the user deletes documents and data by him/herself, irreparable consequences may be caused to startup and normal operations of the terminal device once some critical files are deleted.